import {ref} from 'vue'
import PageTable from '@/components/page-table';

export function usePageSearch(){
    const pageTableRef = ref<InstanceType<typeof PageTable>>();
    //重置按钮的响应函数
    const handleResetFn = () => {
      pageTableRef.value?.getData();
    };
    // 搜索按钮的响应函数
    const handleSearchFn = (queryInfo: any) => {
      pageTableRef.value?.getData(queryInfo);
    };
    return {
        pageTableRef,
        handleResetFn,
        handleSearchFn
    }
}